package com.oa.framework.org.department.service;

import com.oa.common.exception.CreateObjectException;
import com.oa.common.exception.UpdateObjectException;
import com.oa.framework.org.department.domain.Department;

import java.util.List;

/**
 * @author
 */
public interface DepartmentService {

    /**
     * 部门列表
     * @param
     * @return
     */
    List<Department> loadDepartments();
    /**
     * 得到组织机构树
     * @return
     */
    Department loadFoldDepartment();
    /**
     * 根据Id获得部门信息
     * @param deptId
     * @return
     */
    Department getDepartment(Long deptId);

    /**
     * 加载包含职务信息的部门信息
     * @return
     */
    List<Department> loadDepartmentIncludeDuties();
    /**
     * 根据部门Id查找包含职务的部门信息
     * @param deptId
     * @return
     */
    Department getDepartmentIncludeDuties(Long deptId);

    /**
     * 添加部门
     * @param department
     * @return
     */
    boolean addDepartment(Department department) throws CreateObjectException;
    /**
     * 更新部门信息
     * @param department
     * @return
     */
    boolean updateDepartment(Department department) throws UpdateObjectException;

    /**
     * 禁用部门
     * @param departmentId
     * @return
     */
    boolean disable(Long departmentId);
}
